package com.artnology.independence.reengineering;

import java.util.regex.Pattern;

import com.artnology.independence.views.LogicalOperator;

public class DVNodePattern {
	private Pattern typePattern = null;
	private LogicalOperator operator = null;
	
	public DVNodePattern(String typePatternString, LogicalOperator operator) {
		typePatternString = typePatternString.toLowerCase();
		typePatternString = typePatternString.replace("*", ".*");
		typePatternString = typePatternString.replace("?", ".?");
		typePattern = Pattern.compile(typePatternString);
		this.operator = operator;
	}

	public Pattern getTypePattern() {
		return typePattern;
	}

	public LogicalOperator getOperator() {
		return operator;
	}
	
	
}